function submitAll() {
  var record = JSON.stringify(recipetb);//对应关系的表
  var drugsRecord =JSON.stringify(drugstb);//药物的表
  var dt = new Object();
  dt.record = record;
  dt.drugs = drugsRecord;
  console.log(dt);
  $.ajax({
    url: '/saveall',
    type :'post',
    datatype:'JSON',
    contentType : 'application/json;charset=UTF-8',
    data: JSON.stringify(dt),
    success:function(res){
      alert("提交成功~!");

    },
    error: function (err) {
      alert('submit error!请重试');
    }
  });

}